export function getClock() {
  var nowDate = new Date()
  var year = nowDate.getFullYear()
  var month = nowDate.getMonth() + 1
  var day = nowDate.getDate()
  var hour = nowDate.getHours()
  var min = nowDate.getMinutes()
  var second = nowDate.getSeconds()

  if (month >= 1 && month <= 9) {
    month = '0' + month
  }
  if (day >= 0 && day <= 9) {
    day = '0' + day
  }
  if (hour < 10) {
    hour = '0' + hour
  }
  if (min < 10) {
    min = '0' + min
  }
  if (second < 10) {
    second = '0' + second
  }
  var clock = year + '/' + month + '/' + day + ' ' + hour + ':' + min + ':' + second
  return clock
}

export function getCurrentTime() {
  var nowDate = new Date()
  // var year = nowDate.getFullYear()
  var month = nowDate.getMonth() + 1
  var day = nowDate.getDate()
  var hour = nowDate.getHours()
  var min = nowDate.getMinutes()
  var second = nowDate.getSeconds()

  if (month >= 1 && month <= 9) {
    month = '0' + month
  }
  if (day >= 0 && day <= 9) {
    day = '0' + day
  }
  if (hour < 10) {
    hour = '0' + hour
  }
  if (min < 10) {
    min = '0' + min
  }
  if (second < 10) {
    second = '0' + second
  }
  var clock = hour + '时' + min + '分' + second + '秒'
  return clock
}

// 时间
export function getCurrentTime2() {
  var nowDate = new Date()
  // var year = nowDate.getFullYear()
  var month = nowDate.getMonth() + 1
  var day = nowDate.getDate()
  var hour = nowDate.getHours()
  var min = nowDate.getMinutes()
  var second = nowDate.getSeconds()

  if (month >= 1 && month <= 9) {
    month = '0' + month
  }
  if (day >= 0 && day <= 9) {
    day = '0' + day
  }
  if (hour < 10) {
    hour = '0' + hour
  }
  if (min < 10) {
    min = '0' + min
  }
  if (second < 10) {
    second = '0' + second
  }
  var clock = hour + ':' + min + ':' + second
  return clock
}

